﻿<?php
session_start();
if(!$_SESSION['login'] || $_SESSION['login'] != 1){
    header('Location:../mm');
    exit;
}
if(isset($_GET['xg']) && $_GET['xg'] == '1'){
    if($_POST['idea']){
        if(file_put_contents("../wtjy/".time().".txt",$_POST['lxfs']."|".$_SESSION['sjh']."|".$_POST['idea'])){
            $_SESSION["xiaoxi"] = "成功提交想法";
            $_SESSION["bcidea"] = "";
            header("Location:002.php?sx=1");
            exit;
        }else{
            $_SESSION["xiaoxi"] = "提交失败，遇到问题联系回锅";
            $_SESSION["bcidea"] = $_POST['idea'];
            $_SESSION["bclxfs"] = $_POST['lxfs'];
            header("Location:wtjy.php");
            exit;
            
        }
    }
}
?>
<!DOCTYPE html>
  <html>
    
    <head>
      <title>
        002问题与建议
      </title>
      <meta charset="utf-8" />
      <meta name="format-detection" content="telephone=no" />
      <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
      <meta name="apple-mobile-web-app-capable" content="yes" />
      <meta name="apple-touch-fullscreen" content="yes" />
      <meta http-equiv="Access-Control-Allow-Origin" content="*" />
        <link rel="stylesheet" href="css/bootstrap.css">
        <link href="css/002.css" type="text/css" rel="stylesheet" />

        <script type="text/javascript" src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
        <script type="text/javascript" src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
        <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js"></script>
      <script type="text/javascript" src="js/wtjy.js"></script>
      <style>
      .gy{ text-indent:70px;font-size:20px;}
      
      .button3 {
          background-color: #baa37c;
          border: none;
          color: white;
          padding: 10px 60px;
          margin-top: 20px;
          position: relative;
          text-align: center;
          text-decoration: none;
          display: inline-block;
          border-radius: 10px;
          font-size: 16px;
        }
    </style>
        <script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?b136fdcc890043f71942e245f3d174ea";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
    </head>
    
    <body>
    <script>
        var sjh = <?php echo '"'.$_SESSION[ 'sjh'].'"' ?>;
    </script>
    <div type="home" class="home" style="margin-top: 20px;">
        <a href="sz"  id="fanhuianniu"><span class="glyphicon glyphicon-home" aria-hidden="true"></span></a>

    </div>
    <div id="wrapper">
        <div class="overlay"></div>

        <!-- Sidebar -->
        <nav class="navbar navbar-inverse navbar-fixed-top " id="sidebar-wrapper" role="navigation">
            <ul class="nav sidebar-nav">
                <li class="sidebar-brand">
                    <span style="font-size: 10px;">
                <?php
                $zblj = '';
                require $zblj.'xlm.php';
                ?>
             </span>
                </li>
                <li >

                    <a class="button1 " type="button"  >
                        设置
                    </a>
                    <ul >

                        <li><a class="button1" type="button" onclick="window.location.href='sz/ymsz.php';">
                                页面设置
                            </a></li>
                        <li><a class="button1" type="button" onclick="window.location.href='sz/djsz.php';">
                                对接设置
                            </a></li>
                        <li><a class="button1" type="button" onclick="window.location.href='sz/tybsz.php';">
                                画板设置
                            </a>
                        </li>
                        <li>
                            <a class="button1" type="button" onclick="window.location.href='sz/xgpw.php';">
                                修改密码
                            </a>
                        </li>
                    </ul>
                </li>
                <?php
                if($_SESSION['lx'] == 'admin' || $_SESSION['lx'] == 'zz')echo '
                <li>
                    <a class="button1" type="button" >
                        管理页面
                    </a>
                    <ul>
                        <li>
                            <a class="button1" type="button" onclick="window.location.href=\'sz/yhgl.php\';">
                                用户管理
                            </a>
                        </li>
                        <li>
                            <a class="button1" type="button" onclick="window.location.href=\'sz/qtcz.php\';">
                                其他操作
                            </a>
                        </li>
                    </ul>
                </li>
                 ';

                ?>
                <li>
                    <a class="button1" type="button" onclick="alert('视频密码：002002');window.open('http://v.youku.com/v_show/id_XMjg4MTc4MDk2NA==.html?spm=a2h3j.8428770.3416059.1');">
                        演示和教程
                    </a>
                </li>

                <li>
                    <a class="button1" type="button" onclick="window.location.href='wtjy.php';">
                        反馈
                    </a>
                </li>

                <li>
                    <a class="button1" type="button" onclick="window.location.href='zj';">
                        足迹
                    </a>
                </li>
                <li>
                    <a class="button1" type="button" onclick="window.location.href='gxym.php';">
                        感谢
                    </a>
                </li>
                <li>
                    <p class="designer">&copy;回锅 陈永彬</p>
                </li>
            </ul>

        </nav>


        <!-- /#sidebar-wrapper -->

        <!-- Page Content -->
        <div id="page-content-wrapper" data-toggle="content">
            <button type="button" class="hamburger is-closed" data-toggle="offcanvas">
                <span class="hamb-top"></span>
                <span class="hamb-middle"></span>
                <span class="hamb-bottom"></span>
            </button>
            </div>
        <div class="container" style="text-align: center;color: white;">
                <h2>问题与建议</h2>
            <div style="font-size:16px;color:white;">你遇到的问题，和你的想法</div>
            <form method="post" action="wtjy.php?xg=1" onsubmit="return Trywtjy();">
                <div >

                    <textarea rows="5"  name="idea" id="dh1" style="width: 100%;color: black;"><?php
                        if(isset($_SESSION["bcidea"])){
                            echo $_SESSION["bcidea"];
                            $_SESSION["bcidea"] = '';
                        }
                        ?></textarea>
                    <i></i>
                    <br />

                    <p>如何联系到你？</p>

                    联系方式：<input type="text" name="lxfs" id="text2" value="<?php
                    if(isset($_SESSION["bclxfs"])){
                        echo $_SESSION["bclxfs"];
                        $_SESSION["bclxfs"] = '';
                    }
                    ?>" />

                    </div>
                <div style="text-align: center;">
                    <?php
                    if(isset($_SESSION['xiaoxi']) && strlen($_SESSION['xiaoxi']) > 0)
                    {
                        echo '<font color = "red">'.$_SESSION['xiaoxi'].'</font>';
                        $_SESSION['xiaoxi'] = '';
                    }
                    ?>
                </div>
                <input class="button3" type="submit" value="提交" />
                </form>
        </div>
        </div>



        
      <div id="huidiao" style="text-align: center;font-size:26px;">
      
      </div>
    <script type="text/javascript" src="js/002nav.js"></script>
    </body>
  
  </html>